<div class="title-menu">
    <h2>Bảng liên hệ</h2>
</div>
<nav class="bonus">
    <a href="<?php echo base_url("backend/contacts/deleteAll"); ?>" onClick="return confirm('Xác nhận xóa')">Xóa tất cả</a>
</nav>
<article>
    <table cellspacing="0" cellpadding="5" border="1">
        <tr>
            <th>ID</th>
            <th>Tên</th>
            <th>Email</th>     
            <th>Tiêu đề</th>
            <th>Nội dung</th>
            <th>Thời gian</th>
            <th>Tùy chọn</th>
        </tr>
        <?php
        if (isset($orders) && count($orders))
            foreach ($orders as $order) {
                ?>
                <tr>
                    <td><?php echo $order->id; ?></td>                    
                    <td><?php echo $order->name; ?></td>
                    <td><?php echo $order->email; ?></td>
                    <td><?php echo $order->title; ?></td>
                    <td><?php echo $order->content; ?></td>
                    <td><?php echo $order->posted; ?></td>
                    <td><a href="<?php echo  base_url("backend/contacts/delete").'/'.$order->id;?>" onClick="return confirm('Xác nhận xóa')">Xóa</a></td>                                      
                </tr>        
                <?php
            }
        ?>
    </table>
    
</article>